[quartz] Fix manual resizing of windows
authorKristian Rietveld <kris@lanedo.com>
Sun, 19 Feb 2012 15:08:26 +0000 (16:08 +0100)
committerKristian Rietveld <kris@lanedo.com>
Tue, 10 Apr 2012 19:54:03 +0000 (21:54 +0200)
commit7e778aa033ad96a1a1ded0cd0780ce90befb4d9f
tree3baeff6f19e8877f9ed88a44fa3c417adc07cbac
parentd5ac2bd37216899f09efa1ad29894062d325d1a8
[quartz] Fix manual resizing of windows

In the Quartz backend, there are two methods by which windows are
resized. The first method is fully handled by Quartz and does not appear
in the event stream the application resizes. The second method is when
we resize windows by ourselves. In OS X this happens when a GTK+ resize
grip is used. This resize grip is larger than the Quartz resize grip.
When the resize is started outside the "Quartz area", we have to handle
it by ourselves.

This patch fixes this manual window resizing by ignoring events while we
are in the process of resizing (such that the events actually arrive at
the sendEvent handler of GdkQuartzWindow where this resize is handled).
When the resize has finished we break all grabs such that GDK is not
stuck thinking the cursor is still in the resize window.
gdk/quartz/GdkQuartzNSWindow.c
gdk/quartz/GdkQuartzNSWindow.h
gdk/quartz/gdkevents-quartz.c